package com.xhj.client;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.xhj.client.impl.VodClientHystrixImpl;
import com.xhj.util.ResultEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(value = "service-vod",fallback = VodClientHystrixImpl.class)
public interface VodClient {

    @RequestMapping(value = "/vod/delete/{videoId}")
    public ResultEntity deleteById(@PathVariable("videoId") String videoId);

    @RequestMapping("/vod/deleteAll")
    public ResultEntity deleteVideoList(@RequestParam("videoIdList") List<String> videoIdList);
}
